package com.desksoft.ecommerce.util.html.view.print.dynamictemplate;

import java.util.ArrayList;
import java.util.List;

import org.dom4j.Element;

import com.desksoft.ecommerce.util.html.element.PageElement;
import com.desksoft.ecommerce.vo.KeyAndValue;

/**
 * 参数配置元素
 * @author Administrator
 *
 */
public class ParamMapElement extends PageElement {

	protected List<KeyAndValue<String,String>> kvList;
	
	public ParamMapElement(Element elmtParamMap) {
		List<Element> elmtKVL = elmtParamMap.elements("param");
		kvList = new ArrayList<KeyAndValue<String,String>>(elmtKVL.size());
		for (Element elmtKV : elmtKVL){
			kvList.add(new KeyAndValue(elmtKV.attributeValue("key"), elmtKV.attributeValue("value")));
		}
	}

	public List<KeyAndValue<String, String>> getKvList() {
		return kvList;
	}

	public void setKvList(List<KeyAndValue<String, String>> kvList) {
		this.kvList = kvList;
	}
	
}
